package com.seckill.search.domain.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.data.annotation.Id;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class Item {
    @Id
    private Long id;
    /** 商品名称 */
    private String name;
    /** 分类id */
    private Long firstCateId;
    /** 分类id2 */
    private Long secondCateId;
    /** 分类id3 */
    private Long thirdCateId;
    /** 商品销量*/
    private Integer sold;
    /** 价格 */
    private Integer price;
    private String iamge;
   // private LocalDateTime publishTime;

    @JsonIgnore
    public List<Long> getCategoryIds(){
        return List.of(firstCateId, secondCateId, thirdCateId);
    }
}
